import request from '@/utils/request'

// 查询风险、危险源识别评分及控制列表
export function listControl(query) {
  return request({
    url: '/risk/control/list',
    method: 'get',
    params: query
  })
}

// 查询风险、危险源识别评分及控制详细
export function getControl(id) {
  return request({
    url: '/risk/control/' + id,
    method: 'get'
  })
}

// 新增风险、危险源识别评分及控制
export function addControl(data) {
  return request({
    url: '/risk/control',
    method: 'post',
    data: data
  })
}

// 修改风险、危险源识别评分及控制
export function updateControl(data) {
  return request({
    url: '/risk/control',
    method: 'put',
    data: data
  })
}

// 删除风险、危险源识别评分及控制
export function delControl(id) {
  return request({
    url: '/risk/control/' + id,
    method: 'delete'
  })
}


export function optionselect() {
  return request({
    url: '/risk/source/optionselect',
    method: 'get'
  })
}

export function overtimeControl() {
  return request({
    url: '/risk/control/overtime',
    method: 'get'
  })
}
